package zad1;
public abstract class Condition {

	abstract boolean ok();

	public synchronized void await() {

		while (!ok())
			try {
				wait();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}

	}

	public synchronized void signal() {
		notifyAll();
	}

}